From a437781a55e7e9dbb88be14b93f0872313ec84ca Mon Sep 17 00:00:00 2001 From: parkrrrr Date: Wed, 15 Oct 2003 16:13:10 +0000 Subject: [PATCH] Fixed crash in mingw build when writing to Cetus format from a GPX file that contained a creation date before 1970; bmgpx creates such GPX files. --- cetus.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/cetus.c b/cetus.c index ac48612ba..4368bb73e 100644 --- a/cetus.c +++ b/cetus.c @@ -205,8 +205,7 @@ cetus_writewpt(waypoint *wpt) rec = xcalloc(sizeof(*rec)+1018,1); - if (wpt->creation_time) { - tm = gmtime(&wpt->creation_time); + if (wpt->creation_time && (NULL != (tm = gmtime(&wpt->creation_time)))){ rec->min = tm->tm_min; rec->hour = tm->tm_hour; rec->sec = tm->tm_sec; -- 2.30.2